@model CaipuGuanliXitong.Models.CookBook

@{
    ViewData["Title"] = "新增菜谱";
}

<h2>新增菜谱</h2>

<form asp-action="Create">
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <div class="form-group">
        <label asp-for="Name" class="control-label">菜谱名称</label>
        <input asp-for="Name" class="form-control" />
        <span asp-validation-for="Name" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label asp-for="Category" class="control-label">分类</label>
        <input asp-for="Category" class="form-control" />
        <span asp-validation-for="Category" class="text-danger"></span>
    </div>
    <div class="form-group">
        <input type="submit" value="创建" class="btn btn-primary" />
        <a asp-action="Index" class="btn btn-secondary">返回列表</a>
    </div>
</form>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}